package ch10_10_3;
public class Square extends GeometricObject implements Colorable{
	private double edgeLength;
	
	/** construct a default square class */
	protected Square(){
		edgeLength = 0;
	}

	/** display a message on how to color the square */
	public void howToColor() {
		System.out.println("color the square in "+this.getColor());
	}

	/** return the area of this square */
	public double getArea() {
		return edgeLength*edgeLength;
	}

	/** set the edge length of this square */
	public void setEdgeLength(double edgeLength){
		this.edgeLength = edgeLength;
	}
	
	/** return the edge length of this square */
	public double getPerimeter() {
		return edgeLength;
	}
}